package com.springboot.middleware.middleware_redisson.server.dto;

import java.io.Serializable;
import java.util.Objects;

public class RMapDto implements Serializable {
    private Integer id;     //id
    private String name;    //名称

    public RMapDto() {
    }

    public RMapDto(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        RMapDto rMapDto = (RMapDto) o;
        return Objects.equals(id, rMapDto.id) && Objects.equals(name, rMapDto.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name);
    }

    @Override
    public String toString() {
        return "RMapDto{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
